<!DOCTYPE html>
<html lang="zh-CN">
    <head>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->

        <title>Login</title>

        <!-- Bootstrap core CSS -->
        <link href="/css/bootstrap.min.css" rel="stylesheet">

        <!-- Custom styles for this template -->
        <link href="signin.css" rel="stylesheet">

    </head>
    <body>
        <div calss="container">
            @if(!Sentry::check())
                <nav class="navbar navbar-inverse" role="navigation">
                    <div class="navbar-header">
                        <a class="navbar-brand" href="#">login please</a>
                    </div>
                        <ul class="nav navbar-nav">
                            <li id="model" class="active"><a >...</a></li>
                            <li><a href="#">...</a></li>
                        </ul>
                </nav>
            @endif
            @section('container')
            
            @show
        </div>
        <!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
        @section('js')
            <script src="/js/jquery-1.11.3.js"></script>
            <!-- Include all compiled plugins (below), or include individual files as needed -->
            <script src="/js/bootstrap.min.js"></script>
            <script>
                $(function(){
                    $("#btn1").click(function(){
                        $.get("/cms/model/findAll", function(data, status){
                            console.log(data);
                        });
                    });
                    $("#add").click(function(){
                        $("#addField").append($("#field").html());
                    });
                    $("#model").click(function(){
                        $.get("/cms/model/findAll", function(data, status){
                            $("#modelTable").append("<table class='table table-hover'><thead><tr><td>#</td><td>title</td></tr></thead>");
                            // $(data).each(function(index){
                            //     data[index]['model_name'];
                            // });
                            $("#modelTable").append("</tbody></table>")
                        });
                    });
                });

            </script>
        @show
    </body>
</html>
